package com.heima.article.controller;

import com.heima.article.dto.CollectionDto;
import com.heima.article.service.IApCollectionService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * APP收藏信息表 前端控制器
 * </p>
 *
 * @author GQ
 * @since 2023-07-14
 */
@RestController
@RequestMapping("/api/v1/article/collection")
@Api(tags = "APP收藏信息表接口")
@CrossOrigin
public class ApCollectionController {

    @Autowired
    private IApCollectionService apCollectionService;

    /**
     * APP端文章收藏
     * @param dto
     * @return
     */
    @PostMapping
    public ResponseResult saveCollection(@RequestBody CollectionDto dto) {
        return apCollectionService.saveCollection(dto);
    }
}
